import { MidwayConfig } from '@midwayjs/core';

export default {
  // use for cookie sign key, should change to your own and keep security
  keys: '1697767911507_5707',
  koa: {
    port: 3001,
  },
  typeorm: {
    dataSource: {
      default: {
        type: 'mysql',
        host: 'localhost',
        port: 3306,
        username: 'root',
        password: '123456',
        database: 'dl-admin',
        synchronize: true, // 如果第一次使用，不存在表，有同步的需求可以写true，注意会丢数据
        logging: true,
        entities: ['**/entity/*{.ts,.js}'], // 扫描entity文件夹
        dateStrings: true,
      },
    },
  },
  // redis: {
  //   client: {
  //     port: 6379,
  //     host: '127.0.0.1',
  //     // password: '123456',
  //     db: 0,
  //   },
  // },
} as MidwayConfig;
